package main

import (
	"wjerp.com/hello/crawler/engine"
	"wjerp.com/hello/crawler/scheduler"
	"wjerp.com/hello/crawler/zhenai/parser"
)

const baseUrl = "http://www.zhenai.com/zhenghun"
func main(){
	//engine.SimpleEngine{}.Run(engine.Request{
	//	Url: baseUrl,
	//	ParseFunc: parser.ParseCityList,
	//})

	//e := engine.ConcurrentEngine{
	//	Scheduler: &scheduler.QueuedScheduler{},
	//	WorkerCount: 100,
	//}
	e := engine.ConcurrentEngine{
		Scheduler: &scheduler.SimpleScheduler{},
		WorkerCount: 100,
	}

	e.Run(engine.Request{
		Url: baseUrl,
		ParseFunc: parser.ParseCityList,
	})
}
